﻿//-----------------------------------------------------------------------
// <copyright file="Suppliers.cs" company="Craig Longford (deltawolf7@gmail.com)">
//     Copyright (c) Craig Longford. All rights reserved.
// </copyright>
//---------------------------------------------------------------------

namespace Delta.Mercury.Business.Commerce
{
    using System;
    using System.Collections.Generic;
    using Delta.Data.DataExpress;

    /// <summary>
    /// Collection of suppliers
    /// </summary>
    [Serializable]
    public class Suppliers : List<Supplier>
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the Suppliers class.
        /// </summary>
        public Suppliers()
        {
        }
        #endregion

        #region Load Methods
        /// <summary>
        /// Get collection of suppliers
        /// </summary>
        /// <param name="showDeleted">Show deleted</param>
        /// <returns>Collection of suppliers</returns>
        public static Suppliers Load(bool showDeleted)
        {
            Parameters parameters = new Parameters();
            parameters.Add(new Parameter("Deleted", showDeleted));
            return DataAccess.GetCollection<Suppliers, Supplier>("LoadSuppliers", System.Data.CommandType.StoredProcedure, parameters);
        }
        #endregion
    }
}
